package com.zzzyh.forumsystemclient.cotroller;

import com.zzzyh.forumsystemclient.common.AppResult;
import com.zzzyh.forumsystemclient.model.SysConfig;
import com.zzzyh.forumsystemclient.services.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/sys/config")
public class SystemConfigController {
    @Autowired
    private ISysConfigService sysConfigService;
    @RequestMapping("/getConfigByKey/{key}")
    public AppResult<SysConfig> selectConfigByKey(@PathVariable("key") String key) {
        return AppResult.success(sysConfigService.selectConfigByKey(key));
    }
}
